package day9;

public class D9_2 {
    public static void main(String[] args) {
        OldPhone oldPhone=new OldPhone();
        oldPhone.sendMessage();
        oldPhone.call();
        NewPhone newPhone=new NewPhone();
        newPhone.sendMessage();
        newPhone.call();
        newPhone.playGame();
    }
}
class Phone{
    public void sendMessage(){}
    public void call(){}
}
interface Iplay{
    void playGame();
}
class OldPhone extends Phone{
    @Override
    public void sendMessage() {
        System.out.println("旧手机在发消息....");;
    }

    @Override
    public void call() {
        System.out.println("旧手机在打电话....");;
    }
}
class NewPhone extends Phone implements Iplay{
    @Override
    public void sendMessage() {
        System.out.println("新手机正在发消息....");;
    }

    @Override
    public void call() {
        System.out.println("新手机正在打电话....");;
    }

    @Override
    public void playGame() {
        System.out.println("新手机正在玩游戏....");
    }
}
